class MyPawn extends GamePawn;

		var FinalHUD HUD;
		var vector got;
function moveit(zombiePawn a, vector b){
	if (a != none)
	 if(Role < ROLE_Authority) ServerSelectPawn(a, b);
    else zombieAI(a.Controller).SetOrders(b);
}
function ClientSpawn(Vector hit, String a){
			 if(Role < ROLE_Authority) ServerSpawn(hit,a);
    else {
    	switch(a){
    	case "super":
			Spawn(class 'zombieSpawner',,, hit +vect(0,0,100), rot(0,0,0));
		break;
		case "basic":
		    	Spawn(class 'zombiePawn',,, hit +vect(0,0,100), rot(0,0,0));
				break;
		}
    }

}

reliable server function ServerSpawn(Vector hit, String a){
    	switch(a){
    	case "super":
			Spawn(class 'zombieSpawner',,, hit +vect(0,0,100), rot(0,0,0));
		break;
		case "basic":
		    	Spawn(class 'zombiePawn',,, hit +vect(0,0,100), rot(0,0,0));
				break;
		}
}
reliable server function ServerSelectPawn(Pawn a, vector b)
{
	`Log("Played");
	if(a != none)
	 zombieAI(a.Controller).SetOrders(b);

}
simulated event PostBeginPlay()
{

	super.PostBeginPlay();
	`Log("Custom Pawn up");
			SetPhysics(PHYS_Flying);
			SetLocation(Location + vect(0,0,100));


}
simulated event HitWall (Object.Vector HitNormal, Actor Wall, PrimitiveComponent WallComp){
	`Log("ha");
}
simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
{
	local vector HitNormal;
	local float Radius, Height;

	GetBoundingCylinder(Radius, Height);

	if (Trace(out_CamLoc, HitNormal, Location - vector(out_CamRot) * Radius * 20, Location, false) == None)
	{
		out_CamLoc = Location - vector(out_CamRot) * Radius * 20;
	}
	else
	{
		out_CamLoc = Location + Height * vector(Rotation);
	}

	return false;
}

/**
 * Overriden only to add Camera style TopDown as a FreeCam type, important so the pawn will shoot forward instead of towards the ground
 */
simulated event bool InFreeCam()
{
	local PlayerController	PC;

	PC = PlayerController(Controller);
	return (PC != None && PC.PlayerCamera != None && (PC.PlayerCamera.CameraStyle == 'FreeCam' || PC.PlayerCamera.CameraStyle == 'FreeCam_Default' || PC.PlayerCamera.CameraStyle == 'TopDown') );
}

simulated function name GetDefaultCameraMode( PlayerController RequestedBy )
{

	return 'TopDown';
}
/**
 * Overriden only to add Camera style TopDown as a FreeCam type, important so the pawn will shoot forward instead of towards the ground
 */

defaultproperties
{
	Components.Remove(Sprite)

	Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
		ModShadowFadeoutTime=0.25
		MinTimeBetweenFullUpdates=0.2
		AmbientGlow=(R=.01,G=.01,B=.01,A=1)
		AmbientShadowColor=(R=0.15,G=0.15,B=0.15)
		LightShadowMode=LightShadow_ModulateBetter
		ShadowFilterQuality=SFQ_High
		bSynthesizeSHLight=TRUE
	End Object
	Components.Add(MyLightEnvironment)

    Begin Object Class=SkeletalMeshComponent Name=InitialSkeletalMesh
		CastShadow=true
		bCastDynamicShadow=true
		bOwnerNoSee=false
		LightEnvironment=MyLightEnvironment;
        BlockRigidBody=false;
        CollideActors=false;
        BlockZeroExtent=false;
		PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics'
		AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_AimOffset'
		AnimSets(1)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
		AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
		SkeletalMesh=SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode'
	End Object
	
	Mesh=InitialSkeletalMesh;
	Components.Add(InitialSkeletalMesh);
		Begin Object Name=CollisionCylinder
		CollisionRadius=+0034.000000
		CollisionHeight=+0078.000000
		BlockNonZeroExtent=false
		BlockZeroExtent=false
		BlockActors=false
		CollideActors=false
	End Object
}
